-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vespa schema changes for query control & general quality of life #163
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Left some comments below. I'm looking forward to seeing how we get on with nativerank!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Small suggestion below but non-blocking 👍
overlapping_keys = set(vespa_request_body.keys()) & set( | ||
parameters.custom_vespa_request_body.keys() | ||
) | ||
if overlapping_keys: | ||
_LOGGER.warning( | ||
f"Custom request body contains overlapping keys that will override defaults: {overlapping_keys}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overlapping keys check feels like it could be lifted into a distinct utility method, that would also make it easy to unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An important part of this to me is specifying that the request body contains overlapping keys, which I think we'd then loose if lifting out to a utility method? Wdyt?
Description
A batch of changes to the schema making use of inheritance, input parameters and summaries. These aim to mean we can have more control over search without requiring schema changes in future. Recommended that the easiest way to go through this PR is by commit.
Change since reviews of the draft PR: you can now add a custom request body in
SearchParameters
, which gives us full control over theSearchAdaptor
without having to push field changes through the schema and then pydantic models, and more immediately gives us control over the weightings of individual query components. I've demonstrated this in a test which shows that setting thecloseness
features to 0 is the same as using thehybrid_no_closeness
rank profile.Also:
adds text fields withthis didn't work, so have deleted it from this PR_bolding
suffixes which give the bolded version of each when a search is doneSidenote: I tried to test this on the backend using the test pypi published package from this PR's CI but the Vespa dependency seemed to be broken on that. Not sure whether this is just me or it's actually broken 🤷
Proposed version
Please select the option below that is most relevant from the list below. This
will be used to generate the next tag version name during auto-tagging.
Visit the Semver website to understand the
difference between
MAJOR
,MINOR
, andPATCH
versions.Notes:
used -- e.g. Major > Minor > Patch
sure your selected option is marked
[x]
with no spaces in between thebrackets and the
x
Type of change
Please select the option(s) below that are most relevant:
How Has This Been Tested?
Please describe the tests that you added to verify your changes.
Before submitting
section of the
CONTRIBUTING
docs.Writing docstrings section of the
CONTRIBUTING
docs.